<template>
	<view class="glowing-page">
		<view class="topView">
			<navigator url="/pages/my/set-person-head" hover-class="none">
				<view class="header">
					<image class="img" :src="user.headUrl" mode="aspectFill" v-if="user.headUrl"></image>
					<image class="img" src="../../static/my/morentouxiangbeifen.png" mode="aspectFill" v-else></image>
				</view>
			</navigator>

			<view class="userInfo">
				<view class="nick">
					{{user.nick}}
				</view>
				<view class="email">
					{{user.userAcc}}
				</view>
			</view>

		</view>
		<view class="list">
			<navigator hover-class="none" url="/pages/my/security">
				<view class="item">
					<view class="left">
						<view class="item-icon">
							<image class="icon-img" src="../../static/my/zhanghaoanquan.png" mode="aspectFill"></image>
						</view>
						<view class="item-title">
							{{$t('my.accountSecurity')}}
						</view>
					</view>
					<view class="right">
						<uni-icons type="right"></uni-icons>
					</view>
				</view>
			</navigator>

			<navigator hover-class="none" url="/pages/my/messagenotify">
				<view class="item">
					<view class="left">
						<view class="item-icon">
							<image class="icon-img" src="../../static/my/xiaoxitongzhi.png" mode="aspectFill"></image>
						</view>
						<view class="item-title">
							{{$t('my.appNotify')}}
						</view>
					</view>
					<view class="right">
						<uni-icons type="right"></uni-icons>
					</view>
				</view>
			</navigator>
			<navigator hover-class="none" url="/pages/my/about">
				<view class="item">
					<view class="left">
						<view class="item-icon">
							<image class="icon-img" src="../../static/my/guanyu.png" mode="aspectFill">
							</image>
						</view>
						<view class="item-title">
							{{$t('my.about')}}
						</view>
					</view>
					<view class="right">
						<uni-icons type="right"></uni-icons>
					</view>
				</view>
			</navigator>
		<navigator hover-class="none" url="/pages/my/contact_us">
				<view class="item">
					<view class="left">
						<view class="item-icon">
							<image class="icon-img" src="../../static/my/lianxikefu.png" mode="aspectFill">
							</image>
						</view>
						<view class="item-title">
							{{$t('my.callOnline')}}
						</view>
					</view>
					<view class="right">
						<uni-icons type="right"></uni-icons>
					</view>
				</view>
			</navigator>
			<navigator hover-class="none" url="/pages/my/feedback">
				<view class="item">
					<view class="left">
						<view class="item-icon">
							<image class="icon-img" src="../../static/function_list/function_help.png"
								mode="aspectFill">
							</image>
						</view>
						<view class="item-title">
							{{$t('my.feedBack')}}
						</view>
					</view>
					<view class="right">
						<uni-icons type="right"></uni-icons>
					</view>
				</view>
			</navigator>
		</view>
	</view>
</template>

<script>
	import store from '../../store';
	import { i18nTool } from '../../utils/i18en';
	export default {
		data() {
			return {
				user: null,
				isDark: true
			}
		},
		methods: {
			// postMessage(v){
			// 	console.log(v)
			// }
		},
		computed: {
			// gettest(){
			// 	return store.getters.testdata
			// }
		},
		onLoad() {
			
			// store.commit('gettestaa')
			// setTimeout(()=>{
			// 	this.postMessage(this.gettest)
			// },5000)
		},
		onShow() {
			this.user = uni.getStorageSync('user');
			uni.setNavigationBarTitle({
				title: i18nTool('my.navTitle')
			})
		}
	}
</script>

<style lang="scss" scoped>
	.glowing-page {
		position: fixed;
		/* 定位使用 */
		height: 100%;
		width: 100%;

		overflow: hidden;
		background-color: #f1f1f1;

		/* 根据需要调整边框粗细 */
		.topView {
			background-color: #fff;
			display: flex;
			align-items: center;
			padding: 50rpx 30rpx;

			.header {
				width: 120rpx;
				height: 120rpx;
				border-radius: 50%;

				.img {
					width: 100%;
					height: 100%;
					border-radius: 50%;
				}
			}

			.userInfo {
				.nick {
					padding-left: 10rpx;
					font-size: 30rpx;
					font-weight: bold;
					color: #333;
				}

				.email {
					padding-left: 10rpx;
					font-size: 28rpx;
					color: #666;
				}
			}
		}

		.list {


			.item {
				background-color: #fff;
				display: flex;
				align-items: center;
				justify-content: space-between;
				border-radius: 20rpx;
				margin: 20rpx 20rpx;
				padding: 30rpx 20rpx;

				.left {
					display: flex;
					align-items: center;
					justify-content: space-between;

					.item-icon {
						width: 46rpx;
						height: 46rpx;

						.icon-img {
							width: 100%;
							height: 100%;
						}
					}

					.item-title {
						font-size: 30rpx;
						padding-left: 20rpx;
					}
				}

			}
		}
	}
	
</style>